package dapps.service.monitor;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import dapps.dao.jdbc.SmsJdbcDao;

@Service
// 默认将类中的所有函数纳入事务管理.
@Transactional
public class SmsJdbcManager  {
	@Autowired
	private SmsJdbcDao smsDao;
	
	protected SmsJdbcDao getEntityDao() {
		return smsDao;
	}
	
	public int sendsms(String[] mobilelist,String content) {
		return smsDao.sendsms(mobilelist, content);
	}
	public String getHistory(Long districtid){
		return smsDao.getHistory(districtid);
	}
	public void updateHistory(Long districtid,String content){
		smsDao.updateHistory(districtid, content);
	}
	public List<Map<String, Object>> getSmsHistoryList(String reportyearmonth,Long districtid) {
		return smsDao.getSmsHistoryList(reportyearmonth, districtid);
	}

}
